<template>
	<view class="page-wrap padding">
		<apply-live v-if="state===0" @change="changeState"/>
		<commit-live v-if="state===1" @change="changeState"/>
		<success-live v-if="state===2"/>
	</view>
</template>

<script>
	import ApplyLive from "./components/ApplyLive"
	import CommitLive from "./components/CommitLive"
	import SuccessLive from "./components/SuccessLive"
	export default{
		data(){
			return {
				state:0
			}
		},
		components:{
			ApplyLive,
			CommitLive,
			SuccessLive
		},
		methods:{
			changeState(state){
				this.state=state
			}
		},
		onLoad({state}){
			this.state=state?+state:0
		}
	}
</script>
<style>
	page {
		background: url("https://hansu-1253325863.cos.ap-shanghai.myqcloud.com/weixinVideo/publish_bg.png") no-repeat;
		background-size: cover;
		background-origin: content-box;
		height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
</style>
<style lang="scss" scoped>
	.page-wrap{
		width:650rpx;
		height:1100rpx;
		@include df-col();
		background-color: #fff;
		border-radius: 10rpx;
		box-sizing: border-box;
	}
</style>
